//*****************************************************************************
//
// Copyright, (C) 2000-2005 Quantic Dream SA
//
// These coded instructions, statements and computer programs contain
// unpublished information, proprietary to Quantic Dream SA and are 
// protected by French and EEC copyright laws. They may not be 
// disclosed to third parties or copied or duplicated, in whole or in part, 
// without prior written consent of Quantic Dream SA
//
// Unpublished-rights reserved under the Copyright Laws of the EEC.
//
//*****************************************************************************
//
//	CLASS:	SHADER
//	The SHADER class implements ...
//
//	JJA : 2012-07-23 - Created
//*****************************************************************************

//=============================================================================
//	CODE STARTS HERE
//=============================================================================

#ifndef SHADER_H
#define SHADER_H

#include <gl/glew.h>

class MESH_INSTANCE;
class CAMERA;

class	SHADER
{
public:
					SHADER();
					~SHADER();

	virtual void	Load( const char* pcVertexShaderPath, const char* pcFragmentShaderPath );

	virtual void	Begin() const													= 0;
	virtual void	Apply( MESH_INSTANCE* pMeshInstance, CAMERA* pCamera ) const	= 0;
	virtual void	End() const														= 0;

protected:
	GLuint			_uiShaderProgramId;

private:
	GLuint			LoadShaderFile( const GLenum eShaderType, const char* pcShaderPath );
	GLuint			CreateProgram( const GLuint uiVertexShaderId, const GLuint uiPixelShaderId );

	GLuint			_uiVertexShaderId;
	GLuint			_uiPixelShaderId;
};

#endif // SHADER_H

//=============================================================================
//	CODE ENDS HERE
//=============================================================================
